<?php
include_once($_SERVER['DOCUMENT_ROOT'].'/public/func.php');
$config=include_once($_SERVER['DOCUMENT_ROOT'].'/public/config.php');

$_POST['time']=time();
$res = add($config,'message',$_POST);

// var_dump($time);die;
// var_dump($res);die;
// echo $res;die;

if($res){
	echo '<script>alert("添加成功！");window.location.href="/home/message/message.php"</script>';
}else{
	echo '<script>alert("添加失败！");window.location.href="/home/message/add.php"</script>';
}

mysql_close();